import { http } from "@/plugin/http";

// 未兑换的商品
export const getUnprocessedList = async (
  params: API.Product.UnprocessedListParams
) => {
  try {
    return await http.post<API.Product.UnprocessedListResponse>(
      "/product/unprocessed-list",
      params
    );
  } catch (error) {
    return null;
  }
};

// 兑换为余额
export const onExchangeBalance = async (
  params: API.Product.ExchangeBalanceParams
) => {
  try {
    await http.post("/product/exchange-balance", params);
    return true;
  } catch (error) {
    return false;
  }
};
